Skip to content

refactor: start interface CCC migration#25

Merged
phroi merged 3 commits intomasterfrom
prelim/interface-ccc-migration
May 5, 2026
Merged

refactor: start interface CCC migration#25
phroi merged 3 commits intomasterfrom
prelim/interface-ccc-migration

Conversation

@phroi
Copy link
Copy Markdown
Member

@phroi phroi commented May 5, 2026

Why

The interface still depends on the old Lumos/v1 stack while the rest of the workspace has moved toward current CCC packages. This starts the migration in a safe preliminary form so we can review the new transaction wiring, query state handling, and local build setup before calling the interface migration complete.

Changes

  • move apps/interface onto workspace @ickb/* CCC packages and remove the app-local lockfile
  • switch wallet config, L1 state queries, and preview/transaction construction to CCC-based flows
  • keep the protocol completion boundary intact while fixing preview failure surfacing, stale loading/error behavior, and local package build wiring
  • polish user-facing iCKB prompts and explorer/address handling for the interim CCC migration

Move apps/interface onto the workspace CCC packages so the UI can exercise the current preview, request, and collect flows without the old Lumos stack. Keep this as a preliminary migration by landing the new transaction wiring, failure handling, and local build setup first.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request performs a significant refactor of the iCKB interface, migrating from Lumos to the CCC (Common CKB Client) ecosystem and integrating the new @ickb/sdk monorepo packages. Key changes include updating the project structure, replacing legacy dependencies with workspace packages, and rewriting the transaction building and state management logic to use the new SDK. The review comment correctly identifies a potential infinite loop in the transaction status polling logic and provides an actionable suggestion to implement a retry limit or timeout.

Comment thread apps/interface/src/Action.tsx
Stop the CCC confirmation loop from waiting forever when a transaction never reaches a terminal state. Surface a timeout error instead so the interface can recover and the user gets a concrete failure message.
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 5, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the iCKB interface to transition from Lumos-based logic to the Common CKB Connector (CCC) and a new set of workspace packages (@ickb/core, @ickb/order, @ickb/sdk, @ickb/utils). Key changes include updated local development workflows, a restructured package.json for monorepo integration, and a complete overhaul of transaction building, wallet connection, and state querying logic. Review feedback identifies opportunities to improve error handling for wallet signers, remove redundant query invalidations and cell lock checks, and refactor transaction preview logic for better consistency.

Comment thread apps/interface/src/main.tsx Outdated
Comment thread apps/interface/src/Action.tsx Outdated
Comment thread apps/interface/src/queries.ts Outdated
Comment thread apps/interface/src/transaction.ts
Guard the JoyID signer lookup so the app fails with a concrete error when no CKB signer is available, and trim redundant refresh work in the confirmation path. Keep the exact cell search path direct by dropping a now-redundant lock equality recheck.
@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 5, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the iCKB interface to transition from @ckb-lumos to the @ckb-ccc/ccc library and the new @ickb/* workspace packages (core, order, sdk, utils). Key changes include a complete rewrite of the transaction construction logic in transaction.ts, the migration of state management to @tanstack/react-query in queries.ts and App.tsx, and the implementation of CCC-native wallet connection in Connector.tsx. Additionally, the build system and README have been updated to support the monorepo structure and pnpm workspace filters. I have no feedback to provide as no review comments were submitted.

@phroi
Copy link
Copy Markdown
Member Author

phroi commented May 5, 2026

LGTM

Phroi %123

@phroi phroi merged commit f58e92f into master May 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant